package com.kehutong.auth.dao;

import org.coraframework.orm.annotation.Dao;
import org.coraframework.orm.annotation.Mapper;
import org.coraframework.orm.jdbc.execute.Condition;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Dao
public interface UserDao {

    @Mapper(
            mainDB = true,
            genericType = HashMap.class,
            sql = "select * FROM t_user where FIND_IN_SET('5',roles) and ${} "
    )
    public List<Map<String, Object>> getAdmin(Condition... condition);


//    @Mapper(
//            mainDB = true,
//            genericType = HashMap.class,
//            sql = "select * FROM t_user where FIND_IN_SET(${},roles) and ${}"
//    )
//    public List<Map<String, Object>> getUsers(String roles, Condition... condition);
}
